﻿<Window x:Class="VisualizedTester.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        Height="575"
        Width="638.45"
        Title="Genetic Algorithm ~ Function resolver"
        DataContext="{Binding Main, Source={StaticResource Locator}}">
    
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
	<StackPanel>
		<StackPanel>
			<StackPanel HorizontalAlignment="Left" Margin="50,0,0,0" Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Configuration" Style="{DynamicResource RowHeaderLabelStyle}"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Generation size" Style="{DynamicResource RowLabelStyle}"/>
				<TextBox TextWrapping="Wrap" Text="{Binding GenerationSize}" Style="{DynamicResource RowInputStyle}"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Genome length" Style="{DynamicResource RowLabelStyle}"/>
				<TextBox TextWrapping="Wrap" Text="{Binding GeneLength}" Style="{DynamicResource RowInputStyle}"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Crossover rate" Style="{DynamicResource RowLabelStyle}"/>
				<TextBox TextWrapping="Wrap" Text="{Binding CrossoverRate}" Style="{DynamicResource RowInputStyle}"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Mutation rate" Style="{DynamicResource RowLabelStyle}"/>
				<TextBox TextWrapping="Wrap" Text="{Binding MutationRate}" Style="{DynamicResource RowInputStyle}"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Input set" Style="{DynamicResource RowLabelStyle}"/>
				<TextBox TextWrapping="Wrap" Text="{Binding InputSet}" Style="{DynamicResource RowLongInputStyle}"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Support relative functions" Style="{DynamicResource RowLabelStyle}"/>
				<CheckBox Content="" IsChecked="{Binding SupportRelativeFunctions}"/>
			</StackPanel>
            <StackPanel Style="{DynamicResource RowStackPanelStyle}">
                <Label Content="Reduce functions" Style="{DynamicResource RowLabelStyle}"/>
                <CheckBox Content="" IsChecked="{Binding ReduceFunctions}"/>
            </StackPanel>
        </StackPanel>
		<StackPanel>
			<StackPanel HorizontalAlignment="Left" Margin="50,0,0,0" Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Statistics" Style="{DynamicResource RowHeaderLabelStyle}"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Generations" Style="{DynamicResource RowLabelStyle}"/>
				<TextBox TextWrapping="Wrap" Text="{Binding GenerationCount}" Style="{DynamicResource RowInputStyle}" IsReadOnly="True"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Average ranking" Style="{DynamicResource RowLabelStyle}"/>
				<TextBox TextWrapping="Wrap" Text="{Binding AverageRanking}" Style="{DynamicResource RowInputStyle}" IsReadOnly="True"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Best ranking" Style="{DynamicResource RowLabelStyle}"/>
				<TextBox TextWrapping="Wrap" Text="{Binding BestRanking}" Style="{DynamicResource RowInputStyle}" IsReadOnly="True"/>
			</StackPanel>
		</StackPanel>
		<StackPanel>
			<StackPanel HorizontalAlignment="Left" Margin="50,0,0,0" Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Options" Style="{DynamicResource RowHeaderLabelStyle}"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Button Content="Start" Width="75" Margin="5,0,0,0" Command="{Binding StartCommand}"/>
				<Button Content="Stop" Width="75" Margin="5,0,0,0" Command="{Binding StopCommand}"/>
			</StackPanel>
		</StackPanel>
		<StackPanel>
			<StackPanel HorizontalAlignment="Left" Margin="50,0,0,0" Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Results" Style="{DynamicResource RowHeaderLabelStyle}"/>
			</StackPanel>
			<StackPanel Style="{DynamicResource RowStackPanelStyle}">
				<Label Content="Result set" Style="{DynamicResource RowLabelStyle}"/>
				<TextBox TextWrapping="Wrap" Text="{Binding OutputSet}" Style="{DynamicResource RowLongInputStyle}" IsReadOnly="True"/>
			</StackPanel>
            <StackPanel Style="{DynamicResource RowStackPanelStyle}">
                <Label Content="Result function" Style="{DynamicResource RowLabelStyle}"/>
                <TextBox TextWrapping="Wrap" Text="{Binding ResultFunction}" Style="{DynamicResource RowLongInputStyle}" IsReadOnly="True"/>
            </StackPanel>
            <StackPanel Style="{DynamicResource RowStackPanelStyle}">
            	<Label Content="Tryout!" Style="{DynamicResource RowLabelStyle}"/>
            	<TextBox TextWrapping="Wrap" Text="{Binding TestInput}" Style="{DynamicResource RowInputStyle}"/>
            	<Button Content="Test" Width="75" Margin="5,0,0,0" Command="{Binding TestInputCommand}"/>
            	<Label Content="Result:"/>
            	<TextBox TextWrapping="Wrap" Text="{Binding TestOutput}" Style="{DynamicResource RowInputStyle}" IsReadOnly="True"/>
            </StackPanel>
        </StackPanel>
	</StackPanel>
</Window>
